import {View, Button, Text, Image, ScrollView, Radio, Input} from '@tarojs/components';
import Taro from '@tarojs/taro';
import React, {Component} from 'react';
import * as T from '../types';
import './search.less';
import actions from '../actions/index';
import {connect} from 'react-redux';
import {store2Props} from '../selectors';
type ITopProps = T.IProps & T.ITopProps;
import {AtIcon} from 'taro-ui';
import 'taro-ui/dist/style/components/icon.scss';
//@ts-ignore
@connect<Partial<ITopProps>, T.ITopState>(store2Props, actions)
export default class Info extends Component<Partial<ITopProps>, T.ITopState> {
  constructor(props: ITopProps) {
    super(props);
    this.state = {};
  }

  render() {
    const {
      actions: {action},
      main: {searchParams},
    } = this.props;
    return (
      <View className="cinemaTicketOrderSearch">
        <Input
          onConfirm={(e) => {
            action.commonChange('main.searchParams', {
              orderNo: e.detail.value.length <= 0 ? undefined : e.detail.value,
              status: searchParams.status,
              pageNum: 1,
              pageSize: 10,
            });
            action.page(true);
          }}
          confirmType="search"
          className="cinemaTicketOrderSearch-input"
          placeholder="请输入订单号搜索"
        ></Input>
        <AtIcon value="search" size="20" color="#666666" className="cinemaTicketOrderSearch-icon"></AtIcon>
      </View>
    );
  }
}
